<template>
  <div>
    <p-select
      placeholder="请选择"
      v-bind="$attrs"
      size="small"
      :style="[{width:(width || 40) +'px'}]"
      v-on="$listeners"
    >
      <p-select-option
        v-for="item in options"
        :key="item.value"
        :value="item.value"
      >
        {{ item.label }}
      </p-select-option>
    </p-select>
  </div>
</template>

<script>
const mockData = [{
  id: '11',
  data: [
    { label: '选项1', value: 1 },
    { label: '选项2', value: 2 },
    { label: '选项3', value: 3 }
  ]
},
{
  id: '12',
  data: [
    { label: '选项12', value: 1 },
    { label: '选项22', value: 2 },
    { label: '选项32', value: 3 }
  ]
}
]
export default {
  props: {
    id: String,
    width: String
  },
  data () {
    return {
      options: []
    }
  },
  created () {
    // this.requestUtil({url:`${this.urls.dic.url}/${this.id}`}).then(res=>{
    //   this.options = res.data || []
    // })
    this.options = mockData.find(item => {
      return item.id == this.id
    }).data
  },
  mounted () {
  },
  methods: {

  }
}
</script>

<style scoped lang="less">

</style>

<style lang="less">

</style>
